import React from 'react';
import { Button } from "antd";
import { Drawer } from "@ecoding/components.antd";

const C = () => {
    const drawer = async () => {
        Drawer.show({
            component: "ReactNode 内容",
            title: "标题",
            onOk: () => {
                return new Promise(async (resolve, reject) => {
                    try {
                        resolve(true);
                    } catch (e: any) {
                        reject(e);
                    }
                });
            },
            onOkAfter: () => {
            }
        });
    };

    return (
        <>
            <Button type="primary" onClick={() => drawer()}>
                侧拉弹框
            </Button>
        </>
    );
}

export default C;